package com.bifang.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.List;
import lombok.Data;

/**
 * 业务日志表单信息
 *
 * @author chenzh
 * @since 2020-06-12
 */
@Data
@ApiModel(value = "OplogTableChange对象", description = "业务日志表单信息")
public class OplogChangeVO extends BaseVO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "变动ID")
    private Long changeId;

    @ApiModelProperty(value = "操作日志id")
    private Long oplogId;

    @ApiModelProperty(value = "业务年月")
    private Integer dateYm;

    @ApiModelProperty(value = "操作类型 10 新增 20 修改 30逻辑删除 31 物理删除")
    private String opType;

    @ApiModelProperty(value = "操作的表")
    private String opTable;

    @ApiModelProperty(value = "唯一id")
    private String uniqueValue;

    @ApiModelProperty(value = "表实体类路径")
    private String beanClassPath;

    @ApiModelProperty(value = "表处理类名称")
    private String mapperClassName;

    @ApiModelProperty(value = "表数据信息")
    private String tableJson;

    @ApiModelProperty(value = "变动信息 记录变动前后数据")
    private String changJson;

    @ApiModelProperty(value = "上次记录")
    private Long supChangeId;

    @ApiModelProperty(value = "唯一id字段")
    private String dataType;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "排列顺序")
    private Integer orderNo;

    @ApiModelProperty(value = "有效标志 0 有效 1无效")
    private String status;

    @ApiModelProperty(value = "是否最后一条数据")
    private String lastFlag;

    @ApiModelProperty(value = "变动前")
    private Object beforeInfo;

    @ApiModelProperty(value = "变动后")
    private Object afterInfo;

    @ApiModelProperty(value = "字段变动列表")
    private List<ModifiedFieldVO> changeList;
}
